	<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	template="/template/template_blank.xhtml">
	<ui:define name="head">
		<script src="#{request.contextPath}/resources/js/calendarLocale.js"></script>
		<style type="text/css">
            .value {
                font-weight: bold;
            }            
            .ui-datatable {
                margin-bottom: 25px
            }            
            .ui-datatable .ui-datatable-footer {
                text-align:right;
                background:none;
                background-color:none;
                background-image: none;
                border-bottom: 0pt;
                border-left: 0pt;
                border-right: 0pt;
                margin-top: -28px;
            }
            .ui-paginator{
           	 	text-align: left;
           	  	background:none;
                background-color:none;
                background-image: none;
                border-bottom: 0pt;
                border-left: 0pt;
                border-right: 0pt;
            }
            .ui-datalist ul {
                padding: 0 0 0 10px;
                margin: 5px 0;
            }            
            .ui-datatable .ui-button-icon-only .ui-button-text {
                padding: 0;
                line-height: 1.2;
            }          
        </style>
	</ui:define>
	 <ui:define name="content">
		<h:form id="form1">
			<p:confirmDialog global="true" showEffect="fade" hideEffect="fade">
		        <p:commandButton value="是" type="button" styleClass="ui-confirmdialog-yes" icon="ui-icon-check" />
		        <p:commandButton value="否" type="button" styleClass="ui-confirmdialog-no" icon="ui-icon-close" />
		    </p:confirmDialog>
			<p:growl id="message" showDetail="true" />
			<p:panel id="query_panel" >
				<h:panelGrid    columns="13"  id="query_info">
					<h:outputText value="线路名称：" />
			 		<p:inputText value="#{lineDataController.lineName}"/>
					<h:outputText style="margin-left:40px" value="开始时间(起)：" />
					<p:calendar value="#{lineDataController.startDate}"
								pattern="yyyy-MM-dd" />
					<h:outputText value="(止)：" />
					<p:calendar	value="#{lineDataController.endDate}"
								pattern="yyyy-MM-dd" />
			 		<p:commandButton value="查询" icon="ui-icon-search" update="record_list" actionListener="#{lineDataController.query()}"></p:commandButton>
			 		<p:commandButton value="重置"  icon="ui-icon-refresh" update="query_panel" actionListener="#{lineDataController.clearQuery()}"></p:commandButton>
				</h:panelGrid>
			</p:panel>
			 <p:dataTable emptyMessage="无记录" style="margin-top:5px" var="record"
			 	 widgetVar="record_list" id="record_list"
			 	 selectionMode="single"
			 	 rowKey="#{record.id}"
			 	 value="#{lineDataController.records}"
	              >
				<p:column headerText="电压等级"  style="width:10%">
				      <h:outputText  value="#{record.voltageClass}" style="text-align:left" />
				</p:column>
				<p:column headerText="变电站"  style="width:10%">
				      <h:outputText  value="#{record.stationName1}" style="text-align:left" />
				</p:column>
				<p:column headerText="线路名称"  style="width:10%">
				      <h:outputText  value="#{record.lineName}" style="text-align:left" />
				</p:column>
				<p:column headerText="开关名称"  style="width:30%">
				      <h:outputText  value="#{record.switchName}" style="text-align:left" />
				</p:column>
				<p:column headerText="分闸时间"  style="width:9%">
				      <h:outputText  value="#{record.tripTime}" style="text-align:left" >
				      </h:outputText>
				</p:column>
				<p:column headerText="操作"  style="text-align:center; width:20%">
				</p:column>
			</p:dataTable>
		</h:form>
		</ui:define>
	</ui:composition>